/// @file WriterTopoConvertHelper.h
/// @brief WriterTopoConvertHelper
/// @copyright Copyright (c) 2025  Hefei Jiushao Intelligent Technology Co., Ltd. All rights reserved.
/// @createtime 2025-02-18

#ifndef WRITERRTOPOCONVERTHELPER_H
#define WRITERTOPOCONVERTHELPER_H
#include "common/constant.h"
#include "common/PointT.hpp"
#include <topology/TopoEdge.hpp>
#include <topology/TopoFace.hpp>
#include <topology/TopoWire.hpp>
#include "position.hxx"
#include "coedge.hxx"
#include "bs3curve.hxx"
#include <common/AxisT.hpp>
#include <geometry/Geom3Curve.hpp>
#include <geometry/Geom3Surface.hpp>

AMCAX_EXCHANGE_NAMESPACE_BEGIN

namespace InterOp::WriterGeometryConvertHelper
{
    SPAposition ConvertPoint(const AMCAX::Point3 &pt);
    SPAvector ConvertVector(const AMCAX::Axis3 &axis);
    SPAvector ConvertVector(const AMCAX::Vector3 &axis);
    double ConvertToAngle(double rad);
}

namespace InterOp::WriterTopoConvertHelper
{
    EDGE *ConvertStraightLine(std::shared_ptr<Geom3Curve> curve,double fp,double lp);
    EDGE *ConvertEllipse(std::shared_ptr<Geom3Curve> curve,double fp,double lp);
    EDGE *ConvertCircle(std::shared_ptr<Geom3Curve> curve,double fp,double lp);
    EDGE *ConvertBSplineCurve(std::shared_ptr<Geom3Curve> curve,double fp,double lp);
    EDGE *ConvertHelix(std::shared_ptr<Geom3Curve> curve);

    FACE *ConvertFace(const AMCAX::TopoFace &face);
    FACE *ConvertPlane(const AMCAX::TopoFace &face);
    FACE *ConvertCylinder(const AMCAX::TopoFace &face);
    FACE *ConvertCone(const AMCAX::TopoFace &face);
    FACE *ConvertSphere(const AMCAX::TopoFace &face);
    FACE *ConvertTorus(const AMCAX::TopoFace &face);
    FACE *ConvertBsurface(const AMCAX::TopoFace &face);
    FACE *ConvertTrimmedSurface(const AMCAX::TopoFace &face);
    LOOP* GetFaceLoop(const AMCAX::TopoFace &face);
}

AMCAX_EXCHANGE_NAMESPACE_END

#endif